package mya_dc.client.core;

import java.io.Serializable;

import mya_dc.shared_classes.CompilationFlags;

/**
 * saves the client settings
 * 
 * @author      Adam Levi
 * <br>			MYA
 */
public class ClientSettings implements Serializable
{
	private static final long serialVersionUID = 7893917061022461443L;
	public static final String regEdPathNotepadPlusPlus	= System.getProperty("user.dir") + "\\Notepad++\\notepad++.exe";
	public static final String regEdPathVisualStudio 	= "C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\devenv.exe";
	public static final String regEdPathWindowsNotepad 	= "C:\\Windows\\notepad.exe";
	
	//master server
	public String 	masterHostName 	= "localhost";
	public int		setMasterPort(String port)
	{
		try { masterPort = Integer.parseInt(port); }
		catch(Exception e) { return -1; }
		return 0;
	}
	public int		masterPort				= 5668;
	
	//client
	public String	workingDirectory		= "c:\\tmp\\c_p\\";
	public String	outputDirectory			= "c:\\tmp\\output";
	public String	username				= "username";
	public String	password				= "password";
	public boolean	savePassword			= true;
	
	//project
	
	public String	projectName			= "project_test_2";
	public boolean	autoTransferFiles	= false;
	public CompilationFlags compFlags	= new CompilationFlags();

	//preferences
	public enum EEditors {
		NOTEPAD_PLUS_PLUS,
		NOTEPAD_WINDOWS,
		MICROSOFT_VISUAL_STUDIO,
	}
	public String	editorPath		= ClientSettings.regEdPathNotepadPlusPlus;
	public EEditors editor			= EEditors.NOTEPAD_PLUS_PLUS;
	
}
